package pojo;

/**
 * UserProjectId entity. @author MyEclipse Persistence Tools
 */

public class UserProjectId implements java.io.Serializable {

	// Fields

	private long userId;
	private long projectId;
	private boolean isLeader;

	// Constructors

	/** default constructor */
	public UserProjectId() {
	}

	/** full constructor */
	public UserProjectId(long userId, long projectId, boolean isLeader) {
		this.userId = userId;
		this.projectId = projectId;
		this.isLeader = isLeader;
	}

	// Property accessors

	public long getUserId() {
		return this.userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public long getProjectId() {
		return this.projectId;
	}

	public void setProjectId(long projectId) {
		this.projectId = projectId;
	}

	public boolean getIsLeader() {
		return this.isLeader;
	}

	public void setIsLeader(boolean isLeader) {
		this.isLeader = isLeader;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UserProjectId))
			return false;
		UserProjectId castOther = (UserProjectId) other;

		return (this.getUserId() == castOther.getUserId())
				&& (this.getProjectId() == castOther.getProjectId())
				&& (this.getIsLeader() == castOther.getIsLeader());
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (int) this.getUserId();
		result = 37 * result + (int) this.getProjectId();
		result = 37 * result + (this.getIsLeader() ? 1 : 0);
		return result;
	}

}